package service

import (
	"context"
	"home-butler/internal/model"
)

type (
	IMessage interface {
		MessageParsing(ctx context.Context, req *model.MessageReq) (err error)
	}
)

var (
	localMessage IMessage
)

func Message() IMessage {
	if localDevice == nil {
		panic("implement not found for interface IDevice, forgot register?")
	}
	return localMessage
}

func RegisterMessage(i IMessage) {
	localMessage = i
}
